1. Field of the Invention
The present invention relates to an AGC circuit, an AGC circuit gain control method, and a program for the AGC circuit gain control method, and can be applied to an IC recorder which operates as a portable recording/reproducing device, for example. The present invention is constructed to detect the level of an input signal in units of the period of the input signal, and switch recovery time constants on the basis of a decision as to the signal level detection result based on the average shift of the input signal level, thereby ameliorating problems of listening to talk, music and the like.
2. Description of Related Art
Various kinds of recording devices have heretofore been constructed to correct the signal level of an audio signal by an AGC (Automatic Gain Control) circuit. Specifically, when, for example, a talk is recorded by a recording device having an AGC circuit, the voice of a person at a near location is recorded at a large signal level, whereas the voice of a person at a remote location is recorded at a small signal level. If the recorded signal is reproduced at a sound volume appropriate for the voice of the person at the near location with neither of these signal levels corrected, the voice of the person at the remote location is reproduced at a low sound volume and becomes impossible to listen to. Conversely, if the recorded signal is reproduced at a sound volume appropriate for the voice of the person at the remote location, the voice of the person at a near location is reproduced at an excessive high sound volume, so that the voice of the person at the near location becomes impossible to listen to. For this reason, in this case, the AGC circuit corrects the respective voices of the persons at the remote and close locations into approximately equal signal levels by correcting the signal level of an audio signal according to the signal level of the audio signal.
FIG. 18 is a block diagram showing an IC recorder which constitutes one of these kinds of recording devices. In an IC recorder 1, a microphone 2 acquires, during recording, various sounds of a recording target and outputs an audio signal S1, and an amplification circuit 3, during recording, amplifies the audio signal S1 outputted from the microphone 2 by a predetermined gain and outputs the amplified audio signal S1. An analog-to-digital and digital-to-analog conversion circuit (ADDA) 4, during recording, performs digital/analog conversion of the audio signal S1 outputted from the amplification circuit 3 and outputs the resultant audio data D1 to a digital signal processor (DSP) 5. During reproduction (playback), the analog-to-digital and digital-to-analog conversion circuit 4 performs analog/digital conversion of the audio data D1 outputted from the digital signal processor 5, and outputs the resultant audio signal S1 to the second forward/reverse mechanism 6. The second forward/reverse mechanism 6, during reproduction, amplifies the audio signal S1 outputted from the analog-to-digital and digital-to-analog conversion circuit 4 by a predetermined gain, and drives a speaker 7 by this audio signal S1.
The digital signal processor 5, during recording, performs data compression on the audio data D1 outputted from the analog-to-digital and digital-to-analog conversion circuit 4 and generates encoded data D2, and outputs this encoded data D2 to a central processing unit (CPU) 8. During reproduction, the digital signal processor 5 performs data expansion on the encoded data D2 outputted from the central processing unit 8 and decodes the audio data D1, and outputs the resultant audio data D1 to the analog-to-digital and digital-to-analog conversion circuit 4. A memory 9 is made of, for example, a flash memory and, during recording, records and holds the encoded data D2 outputted from the digital signal processor 5, under the control of the central processing unit 8. During reproduction, the memory 9 outputs the held encoded data D2 to the digital signal processor 5 via the central processing unit 8 under the control of the central processing unit 8. The central processing unit 8 is a control circuit which controls the operation of this IC recorder 1. The central processing unit 8, in response to the operation of an operation button 10, instructs each section to perform operation such as recording and reproduction.
In this manner, in the IC recorder 1, after the audio signal S1 acquired by the microphone 2 is amplified with the predetermined gain by the amplification circuit 3, the amplified audio signal S1 is converted into the audio data D1, and this audio data D1 is compressed and is recorded on the memory 9. During reproduction, in the IC recorder 1, after audio data decoded from the encoded data D2 recorded on the memory 9 is expanded by the digital signal processor 5, the audio data is converted into the audio signal S1, and the speaker 7 is driven by the audio signal S1 so as to output reproduced sound.
In this IC recorder 1, an AGC circuit is formed by the digital signal processor 5 so that the signal level of the audio data D1 is corrected by the digital signal processor 15 during reproduction in the above-mentioned audio signal processing sequence.
FIG. 19 is a block diagram showing the construction of the digital signal processor 5 which is performing reproduction. In the digital signal processor 5, a decoder 12 receives the encoded data D2 held in the connecting cord 9 from the central processing unit 8 via a buffer memory 13 made of a random access memory, and performs data expansion on the encoded data D2 and outputs the audio data D1. A variable gain amplification circuit 14 receives the audio data D1 outputted from the decoder 12 via the buffer memory 15, and amplifies the audio data D1 by a predetermined gain specified by a gain control circuit 16 and outputs the resultant audio data D1. A buffer memory 17 stores the audio data D1 outputted from the variable gain amplification circuit 14 and outputs the audio data D1 to the analog-to-digital and digital-to-analog conversion circuit 4.
A level detection circuit 18 detects the signal level of the audio data D1 outputted from the gain control circuit 16, and on the basis of the signal level detection result by the level detection circuit 18, the gain control circuit 16 sets the gain of the variable gain amplification circuit 14 so that the signal level of the audio data D1 detected by the level detection circuit 18 becomes a predetermined level. The digital signal processor 5 processes the sequentially inputted audio data D1 and encoded data D2 by executing a predetermined processing program, and is constructed to have various functional blocks associated with the processing of the audio data and the encoded data, thereby correcting the signal level of the audio signal S1 and realizing the function of the AGC circuit.
The AGC circuit is constructed to correct and output the signal level of the audio data D1 in accordance with the input-output characteristic shown in FIG. 20 by way of example. Namely, if the amplitude value of the audio data D1 is within a range of not higher than a predetermined threshold Lth, the AGC circuit outputs the inputted audio data D1 without suppressing the signal level of the audio data D1, whereas if the amplitude value of the audio data D1 exceeds the threshold Lth, the AGC circuit decreases gain and suppresses the signal level of the audio data D1.
This AGC circuit is constructed to restore the gain suppressed by a so-called recovery time constant into the original gain so as to prevent waveform distortion and the like. However, there is a case where the AGC circuit produces an audio signal hard of listening to, because of the recovery time constant.
As specifically shown in FIGS. 21A to 21C, if the signal level of an input signal in, which has, for example, a constant signal level below the threshold Lth as a whole, rises as a pulse and exceeds the threshold Lth (FIG. 21A), the AGC circuit decreases gain in response to the pulse of the signal level and gradually restores the decreased gain into the original gain by a recovery time constant tR (FIGS. 21B and 21C). Accordingly, the signal level of an output signal out sharply lowers with the pulse rise of the signal level and is gradually restored to the original signal level according to the recovery time constant tR, so that if the recovery time constant tR is relatively long, a long time will be required until the decreased signal level is restored into the original signal level.
Accordingly, as shown in FIGS. 22A and 22B, if a talk is recorded at a constant sound volume during clapping (as shown by symbol “CLAP” in FIGS. 22A and 22B), the voice is intermittently suppressed by the rises of the input signal in, and if the recovery time constant tR is long, the duration of this suppression becomes long and breaks in sound occur, so that the voice becomes extremely hard to listen to (FIGS. 22A and 22B). Conversely, if the recovery time constant tR is short, breaks in sound can be prevented as shown in FIGS. 23A and 23B. However, if the recovery time constant tR is relatively short, the signal level of a long resonant sound sharply varies, so that, for example, when music is being reproduced, it is perceived as if wow-flatter occurred in the bass part of the music, and crisp-sounding noise is perceived in the treble part of the music.
For this reason, the AGC circuit is constructed so that when voice is to be recorded during ordinary conversation, the recovery time constant is set to approximately 10 msec, and when music is to be recorded, the recovery time constant is set to approximately several seconds.
The construction of an AGC circuit capable of switching its recovery time constant is disclosed in Japanese Laid-Open Patent JP-A-2000-151442 and the like.
However, even in the case where the recovery time constant is switched between talk and music in the above-mentioned manner, the problem of difficulty to listen to still remains. Namely, during the recording of voice, if the recovery time constant is set short, the recorded talk becomes easy to listen, but its sound volume instantaneously decreases after clapping or the like owing to the recovery time constant, with the result that the recorded talk still remains hard to listen. During the recording of music, if the recovery time constant is set long, the recorded music becomes easy to listen, but its sound volume sharply decreases after clapping or the like and is gradually restored to the original sound volume, with the result that the recorded music still remains hard to listen.